1. Field of the Invention
The invention relates to a coding method by picture block of a video picture sequence.
2. Discussion of Related Art
The domain is that of video data compression. Of particular interest are the compression diagrams by blocks implementing an adaptive frame/field coding at macroblock level, better known by the abbreviation MBAFF (MacroBlock Adaptive Frame/Field). The standards concerned are for example the MPEG4 part 2 and MPEG4 part 10 standards.
“Block matching” type motion estimation is implemented in an encoder, to use the temporal correlation of the pictures in a sequence of pictures. It calculates pre-selected blocks subtracted from a current block for coding in inter mode. Owing to the different choices in the coding parameters proposed by the standards, for example the size of the picture block for motion estimation, the reference picture or the pictures from which motion estimations are made, the upper field, the lower field or the frame for these reference pictures etc., a selection being then made according to criteria such as coding cost, a significant amount of motion calculations must be realised by the encoder. These calculations are costly in terms of time and processing capacity. The motion estimators must be specific to the encoder or at least be compatible to the multitude of choices proposed in the standard and implemented by the encoder.
For example in the case of the H264 or MPEG4 part 10 standard, a motion vector field is calculated for each block size (4×4, 4×8, 8×4, 8×8, 8×16, 16×8, 16×16) and for each reference picture. FIG. 1 represents different types of a partition of a macroblock of 16 lines of 16 samples, for an encoder using this standard. The first line corresponds to a horizontal and vertical cut of a 16×16 sized macroblock respectively into two sub-macroblocks sized 16×8 and 8×16 and a cut into four 8×8 sized sub-macroblocks. The second line corresponds to these same block cuts but at a lower level, for an 8×8 sized sub-macroblock.
The term picture designates hereafter a picture frame or field. The picture frame is divided into two interlaced fields that are shown at different intervals. The first field in time, known as the upper field or odd field, appears on each odd line of the picture while the second field, known as the lower field or even field, appears on each even line of the picture. The two fields form the frame.
In the case of coding by macroblock pairs or adaptive frame/field coding or MBAFF coding, the motion estimator supplies, per macroblock, 1 motion vector field for the picture frame and 2 motion vector fields for the fields. FIG. 2 shows an example of such MBAFF coding.
16×16 macroblocks referenced 1 and 2 belong to a first upper field shown in vertical solid lines, and a 16×16 macroblock referenced 3 belongs to the next upper field shown in solid lines.
16×16 macroblocks referenced 4 and 5 belong to a first lower field shown in dotted lines, and a 16×16 macroblock referenced 6 belongs to the next lower field shown by a dotted line.
Macroblock pairs in frame mode, referenced 7 and 8, are constituted of two 16×16 macroblocks, each belonging to an interlaced picture or frame, and thus themselves constituted: of a succession of lines of upper and lower fields, the first fields for the pair referenced 7 and the following fields for the pair referenced 8.
If the macroblock pair is coded in frame mode, reference 8, the associated: motion vector referenced 9 points to the preceding interlaced picture, designating a 16×32 macroblock pair referenced 7.
The macroblock pairs in field mode, referenced (1, 4), (2, 5) or (3, 6) are constituted of an upper macroblock containing the lines of the upper field or odd field and a lower macroblock containing the lines of the lower field or even field. If the macroblock pair (3, 6) is coded in field mode, the motion vector associated with the upper macroblock can point either to the macroblock of the upper field or preceding odd field, vector referenced 10, or to the macroblock of the lower field or preceding even field, vector referenced 11. The motion vector associated with the lower macroblock can point either to the macroblock of the preceding even pair, vector referenced 12, or to a macroblock of the preceding odd field, vector referenced 13. Hence, for a macroblock, 3 motion vectors are calculated, for a reference picture, for each of the 5 16×16, 16×8 and 8×16 sub macroblocks and the 9 blocks constituting the 4 8×8 sub macroblocks.
FIG. 3 shows an example of a portion of a sequence of video pictures numbered 1 to 8, according to the display order or temporal order. The pictures indexed 0 and 4, respectively the I0 intra and P4 predictive reference pictures, set 3 bi-predictive pictures B1, B2, B3.
Still in the case of an encoder relying on the H264 or MPEG4 part 10 standard, the encoding process of bi-predictive pictures or B type pictures is more complex than that with P type predictive pictures. Type B pictures possess 2 lists of predictive pictures or reference pictures, called list 0 and list 1, giving rise to more calculations, while P type pictures only have one list, called list 0. Also, the number of coding modes for the B type macroblocks is greater such as bi-predictive mode, direct mode etc., accordingly increasing the complexity of the coding decision algorithm.
Hence, for the 16×16 size macroblocks, in multi-reference mode, the number of motion vectors is multiplied by the number of reference pictures.
The fact that in MBAFF mode, the coding mode decision, which may be based on the measurement of coding costs and the distortion associated with the mode, is made at the level of the macroblock pair and not at the level of the macroblock as for the MPEG2 standard, whereas correlations are calculated at the level of each macroblock, the possible combinations and the resulting calculation load are very high.